package com.hs.communication.common.feign;

import com.hs.common.core.constant.SecurityConstants;
import com.hs.common.core.constant.ServiceNameConstants;
import com.hs.common.core.domain.Result;
import com.hs.communication.common.entity.dto.ParaDto;
import com.hs.communication.common.fallback.RemoteMqttFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 远程调用 charger 服务
 */
@FeignClient(contextId = "remoteMqttService", value = ServiceNameConstants.MQTT_SERVICE, fallbackFactory = RemoteMqttFallbackFactory.class)
public interface RemoteMqttService {
    /**
     * 设置参数
     */
    @PostMapping("/mqtt/parameter")
    Result<Boolean> setParameter(@RequestBody ParaDto paraDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
